﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Substrings
{
    class Program
    {
        static void Main(string[] args)
        {
            string text = "Testing is important. We need to test everything.";
            string target = "test";
            Match match = Regex.Match(text.ToLower(), @"\s?\w*test\w*\s?");
            while (match.Success)
            {
                Console.WriteLine(match.Index + " " + match.Length);
                match = match.NextMatch();
            }
        }
    }
}
